package czx.wt.system.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import czx.wt.system.pojo.Authorities;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: ChenZhiXiang
 * @Date: 2019/6/19 22:09
 * @Description: 权限数据层
 */
public interface AuthoritiesMapper extends BaseMapper<Authorities> {

    /**
     * 根据用户编码查询权限
     * @param userId
     * @return
     */
    List<String> getAuthoritiesByUserId(@Param("userId") Integer userId);

    /**
     * 根据角色编码查询权限
     * @param roleIds
     * @return
     */
    List<String> getAuthoritiesByRoleId(@Param("roleIds") List<Integer> roleIds);
}
